﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CPPEI.PM.Shell
{
    /// <summary>
    /// Interaction logic for LoginWindow.xaml
    /// </summary>
    public partial class LoginWindow : Window
    {
        public LoginWindow()
        {
            InitializeComponent();

            _ctlEditAccount.Text = Environment.UserName;
        }

        private void _ctlBtnLogin_Click_1(object sender, RoutedEventArgs e)
        {
            PMServiceRef.PMWebServiceSoapClient client = new PMServiceRef.PMWebServiceSoapClient();
            client.Login(_ctlEditAccount.Text, "");

            UIContext.Instance.Account = _ctlEditAccount.Text;
            DialogResult = true;
        }
    }
}
